package com.joinway.framework.admin.bean.form;

import org.hibernate.validator.constraints.NotBlank;
import org.jsondoc.core.annotation.ApiObject;
import org.jsondoc.core.annotation.ApiObjectField;

import com.joinway.framework.bean.form.Form;

@ApiObject(name = "ExportForm", description = "导出文件参数", show=false)
public class ExportForm extends Form {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * target db columns, format is 
	 * tableFieldName1,displayName1;tableFieldName2,displayName2;...;tableFieldNameN,displayName1N;
	 * 
	 */
	@NotBlank
	@ApiObjectField(description="导出列，格式：tableFieldName1,displayName1;tableFieldName2,displayName2;...;tableFieldNameN,displayName1N")
	protected String columns;
	
	/**
	 * target table name
	 */
	@NotBlank
	@ApiObjectField(description="导出表名，如loginUser")
	protected String table;

	@ApiObjectField(description="导出的文件名称")
	protected String fileName;
	
	/**
	 * target file type
	 */
	@ApiObjectField(description="导出文件类型:xls,csv")
	protected String type;
	
	@ApiObjectField(description="json格式的查询sql")
	protected String query;
	
	/**
	 * what you see is what you export
	 */
	@ApiObjectField(description="true-只导出可见列;false-导出全部数据")
	protected boolean wysiwye;
	
	protected int port;

	public String getColumns() {
		return columns;
	}

	public void setColumns(String columns) {
		this.columns = columns;
	}

	public String getTable() {
		return table;
	}

	public void setTable(String table) {
		this.table = table;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getQuery() {
		return query;
	}

	public void setQuery(String query) {
		this.query = query;
	}

	public boolean isWysiwye() {
		return wysiwye;
	}

	public void setWysiwye(boolean wysiwye) {
		this.wysiwye = wysiwye;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}
	
}


